<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>预读班ES5基础</title>
</head>


<body>
    <ul>
        <li>1</li>
        <li>2</li>
        <li>3</li>
        <li>4</li>
        <li>5</li>
        <li>6</li>
    </ul>
    <!-- <script type="text/javascript">
        var list_li = document.getElementsByTagName("li");
        for (let li of list_li) {
            li.onclick = function () {
                console.log(this.innerText)
            }
        }
        //[Symbol.iterator] =>for of iterator 
        // for (var i = 0; i < list_li.length; i++) {
        //     list_li[i].onclick = (function (i) {
        //         return function () {
        //             console.log(i + 1);
        //         }
        //     }(i))
        // }
    </script> -->
    <script src="./demo12.js"></script>
</body>

</html>